<template>
    <div>
        <div class="con">
        <div class="con-top">
          <span>{{item.time.getFullYear()}}-{{item.time.getMonth()+1}}-{{item.time.getDate()}}</span>
           <div>
               <span>-￥{{item.sub}}</span>
                <span>+￥{{item.add}}</span>
           </div>
        </div>
        <ul>
            <li v-for="child,i in item.children" :key="i">
                <div><span>{{child.title}}</span>
                <span v-if="child.type=='pay'">{{child.value}}</span>
                <span v-else>{{child.value}}</span></div>
                <p>{{child.date.getMonth()+1}}-{{child.date.getDate()}}</p>
            </li>
        </ul>

    </div>
    </div>
</template>
<script>
export default {
    props:['item']
}
</script>
<style lang="scss" scoped>
.con{
    .con-top{
    display:flex;
    justify-content:space-between;

}
}
</style>

